\(\int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx\) [69]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 37 \[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\cot ^3(c+d x)}{3 a d}-\frac {\csc ^3(c+d x)}{3 a d} \]

[Out]

1/3*cot(d*x+c)^3/a/d-1/3*csc(d*x+c)^3/a/d

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3957, 2918, 2686, 30, 2687} \[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\cot ^3(c+d x)}{3 a d}-\frac {\csc ^3(c+d x)}{3 a d} \]

[In]

Int[Csc[c + d*x]^2/(a + a*Sec[c + d*x]),x]

[Out]

Cot[c + d*x]^3/(3*a*d) - Csc[c + d*x]^3/(3*a*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2918

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = -\int \frac {\cot (c+d x) \csc (c+d x)}{-a-a \cos (c+d x)} \, dx \\ & = -\frac {\int \cot ^2(c+d x) \csc ^2(c+d x) \, dx}{a}+\frac {\int \cot (c+d x) \csc ^3(c+d x) \, dx}{a} \\ & = -\frac {\text {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{a d}-\frac {\text {Subst}\left (\int x^2 \, dx,x,\csc (c+d x)\right )}{a d} \\ & = \frac {\cot ^3(c+d x)}{3 a d}-\frac {\csc ^3(c+d x)}{3 a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.82 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.78 \[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\csc (c) \csc (2 (c+d x)) (-6 \sin (c)+4 \sin (d x)+2 \sin (c+d x)+\sin (2 (c+d x))+2 \sin (c+2 d x))}{6 a d (1+\sec (c+d x))} \]

[In]

Integrate[Csc[c + d*x]^2/(a + a*Sec[c + d*x]),x]

[Out]

(Csc[c]*Csc[2*(c + d*x)]*(-6*Sin[c] + 4*Sin[d*x] + 2*Sin[c + d*x] + Sin[2*(c + d*x)] + 2*Sin[c + 2*d*x]))/(6*a
*d*(1 + Sec[c + d*x]))

Maple [A] (verified)

Time = 0.51 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.95

method result size
parallelrisch \(\frac {-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-3}{12 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a}\) \(35\)
derivativedivides \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) \(36\)
default \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) \(36\)
norman \(\frac {-\frac {1}{4 a d}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{12 d a}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}\) \(41\)
risch \(-\frac {2 i \left (3 \,{\mathrm e}^{2 i \left (d x +c \right )}+2 \,{\mathrm e}^{i \left (d x +c \right )}+1\right )}{3 a d \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}\) \(60\)

[In]

int(csc(d*x+c)^2/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/12*(-tan(1/2*d*x+1/2*c)^4-3)/d/tan(1/2*d*x+1/2*c)/a

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.11 \[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\cos \left (d x + c\right )^{2} + \cos \left (d x + c\right ) + 1}{3 \, {\left (a d \cos \left (d x + c\right ) + a d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(csc(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

-1/3*(cos(d*x + c)^2 + cos(d*x + c) + 1)/((a*d*cos(d*x + c) + a*d)*sin(d*x + c))

Sympy [F]

\[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {\csc ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]

[In]

integrate(csc(d*x+c)**2/(a+a*sec(d*x+c)),x)

[Out]

Integral(csc(c + d*x)**2/(sec(c + d*x) + 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.32 \[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\frac {3 \, {\left (\cos \left (d x + c\right ) + 1\right )}}{a \sin \left (d x + c\right )} + \frac {\sin \left (d x + c\right )^{3}}{a {\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{12 \, d} \]

[In]

integrate(csc(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

-1/12*(3*(cos(d*x + c) + 1)/(a*sin(d*x + c)) + sin(d*x + c)^3/(a*(cos(d*x + c) + 1)^3))/d

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00 \[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}{a} + \frac {3}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{12 \, d} \]

[In]

integrate(csc(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

-1/12*(tan(1/2*d*x + 1/2*c)^3/a + 3/(a*tan(1/2*d*x + 1/2*c)))/d

Mupad [B] (verification not implemented)

Time = 13.81 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.86 \[ \int \frac {\csc ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3}{12\,a\,d\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )} \]

[In]

int(1/(sin(c + d*x)^2*(a + a/cos(c + d*x))),x)

[Out]

-(tan(c/2 + (d*x)/2)^4 + 3)/(12*a*d*tan(c/2 + (d*x)/2))